package com.tools.pojo.analysis.dto;

import lombok.Getter;
import lombok.Setter;

/**
 * 规则统计信息
 */
@Setter
@Getter
public class RuleStatistics {

    private Long ruleId;
    private String ruleName;
    private int matchedPatients;
    private int totalPatients;

    public void incrementMatchedPatients() { this.matchedPatients++; }
    public void incrementTotalPatients() { this.totalPatients++; }

    public double getMatchRate() {
        return totalPatients > 0 ? (double) matchedPatients / totalPatients * 100 : 0;
    }

}
